package com.tangtang.mvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class LoginController
{
	@RequestMapping(value = "/login.do", method = RequestMethod.GET)
	public ModelAndView login()
	{
		ModelAndView mav = new ModelAndView("login");
		return mav;
	}
	
	@RequestMapping(value = "/login.do", method = RequestMethod.POST)
	public String login(String userName, String password)
	{
		return "forward:/index";
	}
}
